package com.mark.beetl.controller;

import com.mark.beetl.entity.User;
import com.mark.beetl.util.JsonResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户controller
 *
 * @author maliqiang
 * @version 1.0
 * @create 2017-05-23
 */
@RestController

public class UserController {
    @RequestMapping("/tologin")
    public String toLogin(){
        return "login";
    }

    @RequestMapping("/login")
    @ResponseBody
    public JsonResult login(User user){
        JsonResult rs = new JsonResult();
        rs.setData(user);
        return rs;
    }
}
